package com.founder.chd_daily_query.entity.query;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "WATER_COAL_SETTLE", schema = "RBD_RESULT", catalog = "")
public class WaterCoalSettleEntity {
    private String balanceId;
    private String powerstationId;
    private String balanceCode;
    private Long amountBalance;
    private String qualityType;
    private String qualitySort;
    private Long value;
    private String qnet;
    private String isPay;
    private Long moneyAll;
    private Long standardCoalUnitprice;
    private Long settleUnitprice;
    private String balanceCodeN;
    private Long amountBalanceN;
    private String qnetN;
    private Long amountDue;
    private Long amountReceived;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date settleTime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date payTime;
    private String contractId;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;

    @Column(name = "BALANCE_BATCH_ID", length = 100)
    private String balanceBatchId;

    @Column(name = "AMOUNT_CHECK")
    private Long amountCheck;

    @Column(name = "VEHICLES_NUM")
    private Long vehiclesNum;

    @Column(name = "AMOUNT_UNBALANCE")
    private Long amountUnbalance;

    public Long getAmountUnbalance() {
        return amountUnbalance;
    }

    public void setAmountUnbalance(Long amountUnbalance) {
        this.amountUnbalance = amountUnbalance;
    }

    public Long getVehiclesNum() {
        return vehiclesNum;
    }

    public void setVehiclesNum(Long vehiclesNum) {
        this.vehiclesNum = vehiclesNum;
    }

    public Long getAmountCheck() {
        return amountCheck;
    }

    public void setAmountCheck(Long amountCheck) {
        this.amountCheck = amountCheck;
    }

    public String getBalanceBatchId() {
        return balanceBatchId;
    }

    public void setBalanceBatchId(String balanceBatchId) {
        this.balanceBatchId = balanceBatchId;
    }

    @Basic
    @Id
    @Column(name = "BALANCE_ID")
    public String getBalanceId() {
        return balanceId;
    }

    public void setBalanceId(String balanceId) {
        this.balanceId = balanceId;
    }

    @Basic
    @Column(name = "POWERSTATION_ID")
    public String getPowerstationId() {
        return powerstationId;
    }

    public void setPowerstationId(String powerstationId) {
        this.powerstationId = powerstationId;
    }

    @Basic
    @Column(name = "BALANCE_CODE")
    public String getBalanceCode() {
        return balanceCode;
    }

    public void setBalanceCode(String balanceCode) {
        this.balanceCode = balanceCode;
    }

    @Basic
    @Column(name = "AMOUNT_BALANCE")
    public Long getAmountBalance() {
        return amountBalance;
    }

    public void setAmountBalance(Long amountBalance) {
        this.amountBalance = amountBalance;
    }

    @Basic
    @Column(name = "QUALITY_TYPE")
    public String getQualityType() {
        return qualityType;
    }

    public void setQualityType(String qualityType) {
        this.qualityType = qualityType;
    }

    @Basic
    @Column(name = "QUALITY_SORT")
    public String getQualitySort() {
        return qualitySort;
    }

    public void setQualitySort(String qualitySort) {
        this.qualitySort = qualitySort;
    }

    @Basic
    @Column(name = "VALUE")
    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }

    @Basic
    @Column(name = "QNET")
    public String getQnet() {
        return qnet;
    }

    public void setQnet(String qnet) {
        this.qnet = qnet;
    }

    @Basic
    @Column(name = "IS_PAY")
    public String getIsPay() {
        return isPay;
    }

    public void setIsPay(String isPay) {
        this.isPay = isPay;
    }

    @Basic
    @Column(name = "MONEY_ALL")
    public Long getMoneyAll() {
        return moneyAll;
    }

    public void setMoneyAll(Long moneyAll) {
        this.moneyAll = moneyAll;
    }

    @Basic
    @Column(name = "STANDARD_COAL_UNITPRICE")
    public Long getStandardCoalUnitprice() {
        return standardCoalUnitprice;
    }

    public void setStandardCoalUnitprice(Long standardCoalUnitprice) {
        this.standardCoalUnitprice = standardCoalUnitprice;
    }

    @Basic
    @Column(name = "SETTLE_UNITPRICE")
    public Long getSettleUnitprice() {
        return settleUnitprice;
    }

    public void setSettleUnitprice(Long settleUnitprice) {
        this.settleUnitprice = settleUnitprice;
    }

    @Basic
    @Column(name = "BALANCE_CODE_N")
    public String getBalanceCodeN() {
        return balanceCodeN;
    }

    public void setBalanceCodeN(String balanceCodeN) {
        this.balanceCodeN = balanceCodeN;
    }

    @Basic
    @Column(name = "AMOUNT_BALANCE_N")
    public Long getAmountBalanceN() {
        return amountBalanceN;
    }

    public void setAmountBalanceN(Long amountBalanceN) {
        this.amountBalanceN = amountBalanceN;
    }

    @Basic
    @Column(name = "QNET_N")
    public String getQnetN() {
        return qnetN;
    }

    public void setQnetN(String qnetN) {
        this.qnetN = qnetN;
    }

    @Basic
    @Column(name = "AMOUNT_DUE")
    public Long getAmountDue() {
        return amountDue;
    }

    public void setAmountDue(Long amountDue) {
        this.amountDue = amountDue;
    }

    @Basic
    @Column(name = "AMOUNT_RECEIVED")
    public Long getAmountReceived() {
        return amountReceived;
    }

    public void setAmountReceived(Long amountReceived) {
        this.amountReceived = amountReceived;
    }

    @Basic
    @Column(name = "SETTLE_TIME")
    public Date getSettleTime() {
        return settleTime;
    }

    public void setSettleTime(Date settleTime) {
        this.settleTime = settleTime;
    }

    @Basic
    @Column(name = "PAY_TIME")
    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    @Basic
    @Column(name = "CONTRACT_ID")
    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Override
    public String toString() {
        return "WaterCoalSettleEntity{" +
                "balanceId='" + balanceId + '\'' +
                ", powerstationId='" + powerstationId + '\'' +
                ", balanceCode='" + balanceCode + '\'' +
                ", amountBalance=" + amountBalance +
                ", qualityType='" + qualityType + '\'' +
                ", qualitySort='" + qualitySort + '\'' +
                ", value=" + value +
                ", qnet='" + qnet + '\'' +
                ", isPay='" + isPay + '\'' +
                ", moneyAll=" + moneyAll +
                ", standardCoalUnitprice=" + standardCoalUnitprice +
                ", settleUnitprice=" + settleUnitprice +
                ", balanceCodeN='" + balanceCodeN + '\'' +
                ", amountBalanceN=" + amountBalanceN +
                ", qnetN='" + qnetN + '\'' +
                ", amountDue=" + amountDue +
                ", amountReceived=" + amountReceived +
                ", settleTime=" + settleTime +
                ", payTime=" + payTime +
                ", contractId='" + contractId + '\'' +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", balanceBatchId='" + balanceBatchId + '\'' +
                ", amountCheck=" + amountCheck +
                ", vehiclesNum=" + vehiclesNum +
                ", amountUnbalance=" + amountUnbalance +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WaterCoalSettleEntity that = (WaterCoalSettleEntity) o;
        return Objects.equals(balanceId, that.balanceId) &&
                Objects.equals(balanceCode, that.balanceCode) &&
                Objects.equals(amountBalance, that.amountBalance) &&
                Objects.equals(qualityType, that.qualityType) &&
                Objects.equals(qualitySort, that.qualitySort) &&
                Objects.equals(value, that.value) &&
                Objects.equals(qnet, that.qnet) &&
                Objects.equals(isPay, that.isPay) &&
                Objects.equals(moneyAll, that.moneyAll) &&
                Objects.equals(standardCoalUnitprice, that.standardCoalUnitprice) &&
                Objects.equals(settleUnitprice, that.settleUnitprice) &&
                Objects.equals(balanceCodeN, that.balanceCodeN) &&
                Objects.equals(amountBalanceN, that.amountBalanceN) &&
                Objects.equals(qnetN, that.qnetN) &&
                Objects.equals(amountDue, that.amountDue) &&
                Objects.equals(amountReceived, that.amountReceived) &&
                Objects.equals(settleTime, that.settleTime) &&
                Objects.equals(payTime, that.payTime) &&
                Objects.equals(contractId, that.contractId) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(lastUpdateDate, that.lastUpdateDate);
    }

    @Override
    public int hashCode() {

        return Objects.hash(balanceId, balanceCode, amountBalance, qualityType, qualitySort, value, qnet, isPay, moneyAll, standardCoalUnitprice, settleUnitprice, balanceCodeN, amountBalanceN, qnetN, amountDue, amountReceived, settleTime, payTime, contractId, createDate, lastUpdateDate);
    }
}
